home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / GXPrinting.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  66.0 KB  |  2,114 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        GXPrinting.p
  3.  
  4.      Contains:    This file contains all printing APIs except for driver/extension specific ones.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT GXPrinting;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __GXPRINTING__}
  27. {$SETC __GXPRINTING__ := 1}
  28.  
  29. {$I+}
  30. {$SETC GXPrintingIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __CONDITIONALMACROS__}
  34. {$I ConditionalMacros.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __COLLECTIONS__}
  37. {$I Collections.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __DIALOGS__}
  40. {$I Dialogs.p}
  41. {$ENDC}
  42. {$IFC UNDEFINED __ERRORS__}
  43. {$I Errors.p}
  44. {$ENDC}
  45. {$IFC UNDEFINED __FILES__}
  46. {$I Files.p}
  47. {$ENDC}
  48. {$IFC UNDEFINED __GXFONTS__}
  49. {$I GXFonts.p}
  50. {$ENDC}
  51. {$IFC UNDEFINED __GXMATH__}
  52. {$I GXMath.p}
  53. {$ENDC}
  54. {$IFC UNDEFINED __GXTYPES__}
  55. {$I GXTypes.p}
  56. {$ENDC}
  57. {$IFC UNDEFINED __LISTS__}
  58. {$I Lists.p}
  59. {$ENDC}
  60. {$IFC UNDEFINED __MENUS__}
  61. {$I Menus.p}
  62. {$ENDC}
  63. {$IFC UNDEFINED __GXMESSAGES__}
  64. {$I GXMessages.p}
  65. {$ENDC}
  66. {$IFC UNDEFINED __PRINTING__}
  67. {$I Printing.p}
  68. {$ENDC}
  69. {$IFC UNDEFINED __QUICKDRAW__}
  70. {$I Quickdraw.p}
  71. {$ENDC}
  72.  
  73.  
  74. {$PUSH}
  75. {$ALIGN MAC68K}
  76. {$LibExport+}
  77.  
  78. {*******************************************************************
  79.                     Start of old "GXPrintingManager.h/a/p" interface file.
  80.             ********************************************************************}
  81. { ------------------------------------------------------------------------------
  82.  
  83.                             Printing Manager API Contants and Types
  84.  
  85. -------------------------------------------------------------------------------- }
  86.  
  87.  
  88. TYPE
  89.     gxOwnerSignature                    = UInt32;
  90. {$IFC OLDROUTINENAMES }
  91.     Signature                            = UInt32;
  92. {$ENDC}  {OLDROUTINENAMES}
  93.  
  94. {
  95.  
  96.     ABSTRACT DATA TYPES
  97.  
  98. }
  99. {
  100.    typedef struct gxPrivatePrinterRecord *gxPrinter;
  101.    typedef struct gxPrivateJobRecord *gxJob;
  102.    typedef struct gxPrivateFormatRecord *gxFormat;
  103.    typedef struct gxPrivatePaperTypeRecord *gxPaperType;
  104.    typedef struct gxPrivatePrintFileRecord *gxPrintFile;
  105. }
  106.  
  107.     gxPrinter = ^LONGINT;
  108.     gxJob = ^LONGINT;
  109.     gxFormat = ^LONGINT;
  110.     gxPaperType = ^LONGINT;
  111.     gxPrintFile = ^LONGINT;
  112. { Possible values for LoopStatus }
  113.     gxLoopStatus                        = BOOLEAN;
  114.  
  115. CONST
  116.     gxStopLooping                = false;
  117.     gxKeepLooping                = true;
  118.  
  119.  
  120. TYPE
  121. {$IFC TYPED_FUNCTION_POINTERS}
  122.     GXViewDeviceProcPtr = FUNCTION(aViewDevice: gxViewDevice; refCon: UNIV Ptr): ByteParameter;
  123. {$ELSEC}
  124.     GXViewDeviceProcPtr = ProcPtr;
  125. {$ENDC}
  126.  
  127.     GXViewDeviceUPP = UniversalProcPtr;
  128.  
  129. CONST
  130.     uppGXViewDeviceProcInfo = $000003D0;
  131.  
  132. FUNCTION NewGXViewDeviceProc(userRoutine: GXViewDeviceProcPtr): GXViewDeviceUPP;
  133.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  134.     INLINE $2E9F;
  135.     {$ENDC}
  136.  
  137. FUNCTION CallGXViewDeviceProc(aViewDevice: gxViewDevice; refCon: UNIV Ptr; userRoutine: GXViewDeviceUPP): ByteParameter;
  138.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  139.     INLINE $205F, $4E90;
  140.     {$ENDC}
  141.  
  142. TYPE
  143. {$IFC TYPED_FUNCTION_POINTERS}
  144.     GXFormatProcPtr = FUNCTION(aFormat: gxFormat; refCon: UNIV Ptr): ByteParameter;
  145. {$ELSEC}
  146.     GXFormatProcPtr = ProcPtr;
  147. {$ENDC}
  148.  
  149.     GXFormatUPP = UniversalProcPtr;
  150.  
  151. CONST
  152.     uppGXFormatProcInfo = $000003D0;
  153.  
  154. FUNCTION NewGXFormatProc(userRoutine: GXFormatProcPtr): GXFormatUPP;
  155.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  156.     INLINE $2E9F;
  157.     {$ENDC}
  158.  
  159. FUNCTION CallGXFormatProc(aFormat: gxFormat; refCon: UNIV Ptr; userRoutine: GXFormatUPP): ByteParameter;
  160.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  161.     INLINE $205F, $4E90;
  162.     {$ENDC}
  163.  
  164. TYPE
  165. {$IFC TYPED_FUNCTION_POINTERS}
  166.     GXPaperTypeProcPtr = FUNCTION(aPapertype: gxPaperType; refCon: UNIV Ptr): ByteParameter;
  167. {$ELSEC}
  168.     GXPaperTypeProcPtr = ProcPtr;
  169. {$ENDC}
  170.  
  171.     GXPaperTypeUPP = UniversalProcPtr;
  172.  
  173. CONST
  174.     uppGXPaperTypeProcInfo = $000003D0;
  175.  
  176. FUNCTION NewGXPaperTypeProc(userRoutine: GXPaperTypeProcPtr): GXPaperTypeUPP;
  177.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  178.     INLINE $2E9F;
  179.     {$ENDC}
  180.  
  181. FUNCTION CallGXPaperTypeProc(aPapertype: gxPaperType; refCon: UNIV Ptr; userRoutine: GXPaperTypeUPP): ByteParameter;
  182.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  183.     INLINE $205F, $4E90;
  184.     {$ENDC}
  185.  
  186. TYPE
  187. {$IFC TYPED_FUNCTION_POINTERS}
  188.     GXPrintingFlattenProcPtr = FUNCTION(size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr): OSErr;
  189. {$ELSEC}
  190.     GXPrintingFlattenProcPtr = ProcPtr;
  191. {$ENDC}
  192.  
  193.     GXPrintingFlattenUPP = UniversalProcPtr;
  194.  
  195. CONST
  196.     uppGXPrintingFlattenProcInfo = $00000FE0;
  197.  
  198. FUNCTION NewGXPrintingFlattenProc(userRoutine: GXPrintingFlattenProcPtr): GXPrintingFlattenUPP;
  199.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  200.     INLINE $2E9F;
  201.     {$ENDC}
  202.  
  203. FUNCTION CallGXPrintingFlattenProc(size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr; userRoutine: GXPrintingFlattenUPP): OSErr;
  204.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  205.     INLINE $205F, $4E90;
  206.     {$ENDC}
  207. {$IFC OLDROUTINENAMES }
  208.  
  209. TYPE
  210.     gxViewDeviceProc                    = GXViewDeviceProcPtr;
  211.     gxFormatProc                        = GXFormatProcPtr;
  212.     gxPaperTypeProc                        = GXPaperTypeProcPtr;
  213.     gxPrintingFlattenProc                = GXPrintingFlattenProcPtr;
  214. {$ENDC}  {OLDROUTINENAMES}
  215.  
  216. {
  217.     The following constants are used to set collection item flags in printing
  218.     collections. The Printing Manager purges certain items whenever a driver
  219.     switch occurs. If the formatting driver changes, all items marked as
  220.     gxVolatileFormattingDriverCategory will be purged.  If the output driver
  221.     changes, all items marked as gxVolatileOutputDriverCategory will be purged.
  222.     Note that to prevent items from being flattened when GXFlattenJob is called,
  223.     you should unset the collectionPersistenceBit (defined in Collections.h),
  224.     which is on by default.
  225. }
  226. { Structure stored in collection items' user attribute bits }
  227.  
  228. TYPE
  229.     gxCollectionCategory                = INTEGER;
  230.  
  231. CONST
  232.     gxNoCollectionCategory        = $0000;
  233.     gxOutputDriverCategory        = $0001;
  234.     gxFormattingDriverCategory    = $0002;
  235.     gxDriverVolatileCategory    = $0004;
  236.     gxVolatileOutputDriverCategory = $0005;
  237.     gxVolatileFormattingDriverCategory = $0006;
  238.  
  239.  
  240. {
  241.  
  242.     >>>>>> JOB COLLECTION ITEMS <<<<<<
  243.  
  244. }
  245.  
  246. { gxJobInfo COLLECTION ITEM }
  247.     gxJobTag                    = 'job ';
  248.  
  249.  
  250. TYPE
  251.     gxJobInfoPtr = ^gxJobInfo;
  252.     gxJobInfo = RECORD
  253.         numPages:                LONGINT;                                {  Number of pages in the document  }
  254.         priority:                LONGINT;                                {  Priority of this job plus "is it on hold?"  }
  255.         timeToPrint:            UInt32;                                    {  When to print job, if scheduled  }
  256.         jobTimeout:                LONGINT;                                {  Timeout value, in ticks  }
  257.         firstPageToPrint:        LONGINT;                                {  Start printing from this page  }
  258.         jobAlert:                INTEGER;                                {  How to alert user when printing  }
  259.         appName:                Str31;                                    {  Which application printed the document  }
  260.         documentName:            Str31;                                    {  The name of the document being printed  }
  261.         userName:                Str31;                                    {  The owner name of the machine that printed the document  }
  262.     END;
  263.  
  264. { gxPDDDefaultSettingTag COLLECTION ITEM }
  265.  
  266. CONST
  267.     gxPDDDefaultSettingTag        = 'pdds';
  268.  
  269.  
  270. TYPE
  271.     gxPDDDefaultSettingInfoPtr = ^gxPDDDefaultSettingInfo;
  272.     gxPDDDefaultSettingInfo = RECORD
  273.         useDefaultSetting:        BOOLEAN;                                {  true if PDD default setting should be used  }
  274.         pad:                    SInt8;
  275.     END;
  276.  
  277. { priority field constants }
  278.  
  279. CONST
  280.     gxPrintJobHoldingBit        = $00001000;                    {  This bit is set if the job is on hold.  }
  281.  
  282.     gxPrintJobUrgent            = $00000001;
  283.     gxPrintJobAtTime            = $00000002;
  284.     gxPrintJobASAP                = $00000003;
  285.     gxPrintJobHolding            = $00001003;
  286.     gxPrintJobHoldingAtTime        = $00001002;
  287.     gxPrintJobHoldingUrgent        = $00001001;
  288.  
  289. { jobAlert field constants }
  290.     gxNoPrintTimeAlert            = 0;                            {  Don't alert user when we print  }
  291.     gxAlertBefore                = 1;                            {  Alert user before we print  }
  292.     gxAlertAfter                = 2;                            {  Alert user after we print  }
  293.     gxAlertBothTimes            = 3;                            {  Alert before and after we print  }
  294.  
  295. { jobTimeout field constants }
  296.     gxThirtySeconds                = 1800;                            {  30 seconds in ticks  }
  297.     gxTwoMinutes                = 7200;                            {  2 minutes in ticks  }
  298.  
  299.  
  300. { gxCollationTag COLLECTION ITEM }
  301.     gxCollationTag                = 'sort';
  302.  
  303.  
  304. TYPE
  305.     gxCollationInfoPtr = ^gxCollationInfo;
  306.     gxCollationInfo = RECORD
  307.         collation:                BOOLEAN;                                {  True if copies are to be collated  }
  308.         padByte:                SInt8;
  309.     END;
  310.  
  311.  
  312. { gxCopiesTag COLLECTION ITEM }
  313.  
  314. CONST
  315.     gxCopiesTag                    = 'copy';
  316.  
  317.  
  318. TYPE
  319.     gxCopiesInfoPtr = ^gxCopiesInfo;
  320.     gxCopiesInfo = RECORD
  321.         copies:                    LONGINT;                                {  Number of copies of the document to print  }
  322.     END;
  323.  
  324.  
  325. { gxPageRangeTag COLLECTION ITEM }
  326.  
  327. CONST
  328.     gxPageRangeTag                = 'rang';
  329.  
  330.  
  331. TYPE
  332.     gxSimplePageRangeInfoPtr = ^gxSimplePageRangeInfo;
  333.     gxSimplePageRangeInfo = RECORD
  334.         optionChosen:            SInt8;                                    {  From options listed below  }
  335.         printAll:                BOOLEAN;                                {  True if user wants to print all pages  }
  336.         fromPage:                LONGINT;                                {  For gxDefaultPageRange, current value  }
  337.         toPage:                    LONGINT;                                {  For gxDefaultPageRange, current value  }
  338.     END;
  339.  
  340.     gxPageRangeInfoPtr = ^gxPageRangeInfo;
  341.     gxPageRangeInfo = RECORD
  342.         simpleRange:            gxSimplePageRangeInfo;                    {  Info which will be returned for GetJobPageRange  }
  343.         fromString:                Str31;                                    {  For gxCustomizePageRange, current value  }
  344.         toString:                Str31;                                    {  For gxCustomizePageRange, current value  }
  345.         minFromPage:            LONGINT;                                {  For gxDefaultPageRange, we parse with this, ignored if nil  }
  346.         maxToPage:                LONGINT;                                {  For gxDefaultPageRange, we parse with this, ignored if nil  }
  347.         replaceString:            SInt8;                                    {  For gxReplacePageRange, string to display  }
  348.     END;
  349.  
  350.  
  351. { optionChosen field constants for SimplePageRangeInfo }
  352.  
  353. CONST
  354.     gxDefaultPageRange            = 0;
  355.     gxReplacePageRange            = 1;
  356.     gxCustomizePageRange        = 2;
  357.  
  358.  
  359. { gxQualityTag COLLECTION ITEM }
  360.     gxQualityTag                = 'qual';
  361.  
  362.  
  363. TYPE
  364.     gxQualityInfoPtr = ^gxQualityInfo;
  365.     gxQualityInfo = RECORD
  366.         disableQuality:            BOOLEAN;                                {  True to disable standard quality controls  }
  367.         padByte:                SInt8;
  368.         defaultQuality:            INTEGER;                                {  The default quality value  }
  369.         currentQuality:            INTEGER;                                {  The current quality value  }
  370.         qualityCount:            INTEGER;                                {  The number of quality menu items in popup menu  }
  371.         qualityNames:            SInt8;                                    {  An array of packed pascal strings for popup menu titles  }
  372.     END;
  373.  
  374.  
  375. { gxFileDestinationTag COLLECTION ITEM }
  376.  
  377. CONST
  378.     gxFileDestinationTag        = 'dest';
  379.  
  380.  
  381. TYPE
  382.     gxFileDestinationInfoPtr = ^gxFileDestinationInfo;
  383.     gxFileDestinationInfo = RECORD
  384.         toFile:                    BOOLEAN;                                {  True if destination is a file  }
  385.         padByte:                SInt8;
  386.     END;
  387.  
  388.  
  389. { gxFileLocationTag COLLECTION ITEM }
  390.  
  391. CONST
  392.     gxFileLocationTag            = 'floc';
  393.  
  394.  
  395. TYPE
  396.     gxFileLocationInfoPtr = ^gxFileLocationInfo;
  397.     gxFileLocationInfo = RECORD
  398.         fileSpec:                FSSpec;                                    {  Location to put file, if destination is file  }
  399.     END;
  400.  
  401.  
  402. { gxFileFormatTag COLLECTION ITEM }
  403.  
  404. CONST
  405.     gxFileFormatTag                = 'ffmt';
  406.  
  407.  
  408. TYPE
  409.     gxFileFormatInfoPtr = ^gxFileFormatInfo;
  410.     gxFileFormatInfo = RECORD
  411.         fileFormatName:            Str31;                                    {  Name of file format (e.g. "PostScript") if destination is file  }
  412.     END;
  413.  
  414.  
  415. { gxFileFontsTag COLLECTION ITEM }
  416.  
  417. CONST
  418.     gxFileFontsTag                = 'incf';
  419.  
  420.  
  421. TYPE
  422.     gxFileFontsInfoPtr = ^gxFileFontsInfo;
  423.     gxFileFontsInfo = RECORD
  424.         includeFonts:            SInt8;                                    {  Which fonts to include, if destination is file  }
  425.         padByte:                SInt8;
  426.     END;
  427.  
  428. { includeFonts field constants }
  429.  
  430. CONST
  431.     gxIncludeNoFonts            = 1;                            {  Include no fonts  }
  432.     gxIncludeAllFonts            = 2;                            {  Include all fonts  }
  433.     gxIncludeNonStandardFonts    = 3;                            {  Include only fonts that aren't in the standard LW set  }
  434.  
  435.  
  436. { gxPaperFeedTag COLLECTION ITEM }
  437.     gxPaperFeedTag                = 'feed';
  438.  
  439.  
  440. TYPE
  441.     gxPaperFeedInfoPtr = ^gxPaperFeedInfo;
  442.     gxPaperFeedInfo = RECORD
  443.         autoFeed:                BOOLEAN;                                {  True if automatic feed, false if manual  }
  444.         padByte:                SInt8;
  445.     END;
  446.  
  447.  
  448. { gxTrayFeedTag COLLECTION ITEM }
  449.  
  450. CONST
  451.     gxTrayFeedTag                = 'tray';
  452.  
  453.  
  454. TYPE
  455.     gxTrayIndex                            = LONGINT;
  456.     gxTrayFeedInfoPtr = ^gxTrayFeedInfo;
  457.     gxTrayFeedInfo = RECORD
  458.         feedTrayIndex:            gxTrayIndex;                            {  Tray to feed paper from  }
  459.         manualFeedThisPage:        BOOLEAN;                                {  Signals manual feeding for the page  }
  460.         padByte:                SInt8;
  461.     END;
  462.  
  463.  
  464. { gxManualFeedTag COLLECTION ITEM }
  465.  
  466. CONST
  467.     gxManualFeedTag                = 'manf';
  468.  
  469.  
  470. TYPE
  471.     gxManualFeedInfoPtr = ^gxManualFeedInfo;
  472.     gxManualFeedInfo = RECORD
  473.         numPaperTypeNames:        LONGINT;                                {  Number of paperTypes to manually feed  }
  474.         paperTypeNames:            ARRAY [0..0] OF Str31;                    {  Array of names of paperTypes to manually feed  }
  475.     END;
  476.  
  477.  
  478. { gxNormalMappingTag COLLECTION ITEM }
  479.  
  480. CONST
  481.     gxNormalMappingTag            = 'nmap';
  482.  
  483.  
  484. TYPE
  485.     gxNormalMappingInfoPtr = ^gxNormalMappingInfo;
  486.     gxNormalMappingInfo = RECORD
  487.         normalPaperMapping:        BOOLEAN;                                {  True if not overriding normal paper mapping  }
  488.         padByte:                SInt8;
  489.     END;
  490.  
  491.  
  492. { gxSpecialMappingTag COLLECTION ITEM }
  493.  
  494. CONST
  495.     gxSpecialMappingTag            = 'smap';
  496.  
  497.  
  498. TYPE
  499.     gxSpecialMappingInfoPtr = ^gxSpecialMappingInfo;
  500.     gxSpecialMappingInfo = RECORD
  501.         specialMapping:            SInt8;                                    {  Enumerated redirect, scale or tile setting  }
  502.         padByte:                SInt8;
  503.     END;
  504.  
  505. { specialMapping field constants }
  506.  
  507. CONST
  508.     gxRedirectPages                = 1;                            {  Redirect pages to a papertype and clip if necessary  }
  509.     gxScalePages                = 2;                            {  Scale pages if necessary  }
  510.     gxTilePages                    = 3;                            {  Tile pages if necessary  }
  511.  
  512.  
  513. { gxTrayMappingTag COLLECTION ITEM }
  514.     gxTrayMappingTag            = 'tmap';
  515.  
  516.  
  517. TYPE
  518.     gxTrayMappingInfoPtr = ^gxTrayMappingInfo;
  519.     gxTrayMappingInfo = RECORD
  520.         mapPaperToTray:            gxTrayIndex;                            {  Tray to map all paper to  }
  521.     END;
  522.  
  523.  
  524. { gxPaperMappingTag COLLECTION ITEM }
  525. { This collection item contains a flattened paper type resource }
  526.  
  527. CONST
  528.     gxPaperMappingTag            = 'pmap';
  529.  
  530.  
  531. { gxPrintPanelTag COLLECTION ITEM }
  532.     gxPrintPanelTag                = 'ppan';
  533.  
  534.  
  535. TYPE
  536.     gxPrintPanelInfoPtr = ^gxPrintPanelInfo;
  537.     gxPrintPanelInfo = RECORD
  538.         startPanelName:            Str31;                                    {  Name of starting panel in Print dialog  }
  539.     END;
  540.  
  541.  
  542. { gxFormatPanelTag COLLECTION ITEM }
  543.  
  544. CONST
  545.     gxFormatPanelTag            = 'fpan';
  546.  
  547.  
  548. TYPE
  549.     gxFormatPanelInfoPtr = ^gxFormatPanelInfo;
  550.     gxFormatPanelInfo = RECORD
  551.         startPanelName:            Str31;                                    {  Name of starting panel in Format dialog  }
  552.     END;
  553.  
  554.  
  555. { gxTranslatedDocumentTag COLLECTION ITEM }
  556.  
  557. CONST
  558.     gxTranslatedDocumentTag        = 'trns';
  559.  
  560.  
  561. TYPE
  562.     gxTranslatedDocumentInfoPtr = ^gxTranslatedDocumentInfo;
  563.     gxTranslatedDocumentInfo = RECORD
  564.         translatorInfo:            LONGINT;                                {  Information from the translation process  }
  565.     END;
  566.  
  567.  
  568. { gxCoverPageTag COLLECTION ITEM }
  569.  
  570. CONST
  571.     gxCoverPageTag                = 'cvpg';
  572.  
  573.  
  574.  
  575. TYPE
  576.     gxCoverPageInfoPtr = ^gxCoverPageInfo;
  577.     gxCoverPageInfo = RECORD
  578.         coverPage:                LONGINT;                                {  Use same enum values as for PrintRecord field in GXPrinterDrivers.h  }
  579.     END;
  580.  
  581. {
  582.  
  583.     >>>>>> FORMAT COLLECTION ITEMS <<<<<<
  584.  
  585. }
  586. { gxPaperTypeLockTag COLLECTION ITEM }
  587.  
  588. CONST
  589.     gxPaperTypeLockTag            = 'ptlk';
  590.  
  591.  
  592. TYPE
  593.     gxPaperTypeLockInfoPtr = ^gxPaperTypeLockInfo;
  594.     gxPaperTypeLockInfo = RECORD
  595.         paperTypeLocked:        BOOLEAN;                                {  True if format's paperType is locked  }
  596.         padByte:                SInt8;
  597.     END;
  598.  
  599.  
  600. { gxOrientationTag COLLECTION ITEM }
  601.  
  602. CONST
  603.     gxOrientationTag            = 'layo';
  604.  
  605.  
  606. TYPE
  607.     gxOrientationInfoPtr = ^gxOrientationInfo;
  608.     gxOrientationInfo = RECORD
  609.         orientation:            SInt8;                                    {  An enumerated orientation value  }
  610.         padByte:                SInt8;
  611.     END;
  612.  
  613. { orientation field constants }
  614.  
  615. CONST
  616.     gxPortraitLayout            = 0;                            {  Portrait  }
  617.     gxLandscapeLayout            = 1;                            {  Landscape  }
  618.     gxRotatedPortraitLayout        = 2;                            {  Portrait, rotated 180°  }
  619.     gxRotatedLandscapeLayout    = 3;                            {  Landscape, rotated 180°   }
  620.  
  621.  
  622. { gxScalingTag COLLECTION ITEM }
  623.     gxScalingTag                = 'scal';
  624.  
  625.  
  626. TYPE
  627.     gxScalingInfoPtr = ^gxScalingInfo;
  628.     gxScalingInfo = RECORD
  629.         horizontalScaleFactor:    Fixed;                                    {  Current horizontal scaling factor  }
  630.         verticalScaleFactor:    Fixed;                                    {  Current vertical scaling factor  }
  631.         minScaling:                INTEGER;                                {  Minimum scaling allowed  }
  632.         maxScaling:                INTEGER;                                {  Maximum scaling allowed  }
  633.     END;
  634.  
  635.  
  636. { gxDirectModeTag COLLECTION ITEM }
  637.  
  638. CONST
  639.     gxDirectModeTag                = 'dirm';
  640.  
  641.  
  642. TYPE
  643.     gxDirectModeInfoPtr = ^gxDirectModeInfo;
  644.     gxDirectModeInfo = RECORD
  645.         directModeOn:            BOOLEAN;                                {  True if a direct mode is enabled  }
  646.         padByte:                SInt8;
  647.     END;
  648.  
  649.  
  650. { gxFormatHalftoneTag COLLECTION ITEM }
  651.  
  652. CONST
  653.     gxFormatHalftoneTag            = 'half';
  654.  
  655.  
  656. TYPE
  657.     gxFormatHalftoneInfoPtr = ^gxFormatHalftoneInfo;
  658.     gxFormatHalftoneInfo = RECORD
  659.         numHalftones:            LONGINT;                                {  Number of halftone records  }
  660.         halftones:                ARRAY [0..0] OF gxHalftone;                {  The halftone records  }
  661.     END;
  662.  
  663.  
  664. { gxInvertPageTag COLLECTION ITEM }
  665.  
  666. CONST
  667.     gxInvertPageTag                = 'invp';
  668.  
  669.  
  670. TYPE
  671.     gxInvertPageInfoPtr = ^gxInvertPageInfo;
  672.     gxInvertPageInfo = RECORD
  673.         padByte:                SInt8;
  674.         invert:                    BOOLEAN;                                {  If true, invert page  }
  675.     END;
  676.  
  677.  
  678. { gxFlipPageHorizontalTag COLLECTION ITEM }
  679.  
  680. CONST
  681.     gxFlipPageHorizontalTag        = 'flph';
  682.  
  683.  
  684. TYPE
  685.     gxFlipPageHorizontalInfoPtr = ^gxFlipPageHorizontalInfo;
  686.     gxFlipPageHorizontalInfo = RECORD
  687.         padByte:                SInt8;
  688.         flipHorizontal:            BOOLEAN;                                {  If true, flip x coordinates on page  }
  689.     END;
  690.  
  691.  
  692. { gxFlipPageVerticalTag COLLECTION ITEM }
  693.  
  694. CONST
  695.     gxFlipPageVerticalTag        = 'flpv';
  696.  
  697.  
  698. TYPE
  699.     gxFlipPageVerticalInfoPtr = ^gxFlipPageVerticalInfo;
  700.     gxFlipPageVerticalInfo = RECORD
  701.         padByte:                SInt8;
  702.         flipVertical:            BOOLEAN;                                {  If true, flip y coordinates on page  }
  703.     END;
  704.  
  705.  
  706. { gxPreciseBitmapsTag COLLECTION ITEM }
  707.  
  708. CONST
  709.     gxPreciseBitmapsTag            = 'pbmp';
  710.  
  711.  
  712. TYPE
  713.     gxPreciseBitmapInfoPtr = ^gxPreciseBitmapInfo;
  714.     gxPreciseBitmapInfo = RECORD
  715.         preciseBitmaps:            BOOLEAN;                                {  If true, scale page by 96%  }
  716.         padByte:                SInt8;
  717.     END;
  718.  
  719.  
  720. {
  721.  
  722.     >>>>>> PAPERTYPE COLLECTION ITEMS <<<<<<
  723.  
  724. }
  725. { gxBaseTag COLLECTION ITEM }
  726.  
  727. CONST
  728.     gxBaseTag                    = 'base';
  729.  
  730.  
  731. TYPE
  732.     gxBaseInfoPtr = ^gxBaseInfo;
  733.     gxBaseInfo = RECORD
  734.         baseType:                LONGINT;                                {  PaperType's base type  }
  735.     END;
  736.  
  737. { baseType field constants }
  738.  
  739. CONST
  740.     gxUnknownBase                = 0;                            {  Base paper type from which this paper type is  }
  741.     gxUSLetterBase                = 1;                            {  derived.  This is not a complete set.  }
  742.     gxUSLegalBase                = 2;
  743.     gxA4LetterBase                = 3;
  744.     gxB5LetterBase                = 4;
  745.     gxTabloidBase                = 5;
  746.  
  747.  
  748. { gxCreatorTag COLLECTION ITEM }
  749.     gxCreatorTag                = 'crea';
  750.  
  751.  
  752. TYPE
  753.     gxCreatorInfoPtr = ^gxCreatorInfo;
  754.     gxCreatorInfo = RECORD
  755.         creator:                OSType;                                    {  PaperType's creator  }
  756.     END;
  757.  
  758. { gxUnitsTag COLLECTION ITEM }
  759.  
  760. CONST
  761.     gxUnitsTag                    = 'unit';
  762.  
  763.  
  764. TYPE
  765.     gxUnitsInfoPtr = ^gxUnitsInfo;
  766.     gxUnitsInfo = RECORD
  767.         units:                    SInt8;                                    {  PaperType's units (used by PaperType Editor).  }
  768.         padByte:                SInt8;
  769.     END;
  770.  
  771. { units field constants }
  772.  
  773. CONST
  774.     gxPicas                        = 0;                            {  Pica measurement  }
  775.     gxMMs                        = 1;                            {  Millimeter measurement  }
  776.     gxInches                    = 2;                            {  Inches measurement  }
  777.  
  778.  
  779. { gxFlagsTag COLLECTION ITEM }
  780.     gxFlagsTag                    = 'flag';
  781.  
  782.  
  783. TYPE
  784.     gxFlagsInfoPtr = ^gxFlagsInfo;
  785.     gxFlagsInfo = RECORD
  786.         flags:                    LONGINT;                                {  PaperType's flags  }
  787.     END;
  788.  
  789. { flags field constants }
  790.  
  791. CONST
  792.     gxOldPaperTypeFlag            = $00800000;                    {  Indicates a paper type for compatibility printing  }
  793.     gxNewPaperTypeFlag            = $00400000;                    {  Indicates a paper type for QuickDraw GX-aware printing  }
  794.     gxOldAndNewFlag                = $00C00000;                    {  Indicates a paper type that's both old and new  }
  795.     gxDefaultPaperTypeFlag        = $00100000;                    {  Indicates the default paper type in the group  }
  796.  
  797.  
  798. { gxCommentTag COLLECTION ITEM }
  799.     gxCommentTag                = 'cmnt';
  800.  
  801.  
  802. TYPE
  803.     gxCommentInfoPtr = ^gxCommentInfo;
  804.     gxCommentInfo = RECORD
  805.         comment:                Str255;                                    {  PaperType's comment  }
  806.     END;
  807.  
  808.  
  809. {
  810.  
  811.     >>>>>> PRINTER VIEWDEVICE TAGS <<<<<<
  812.  
  813. }
  814. { gxPenTableTag COLLECTION ITEM }
  815.  
  816. CONST
  817.     gxPenTableTag                = 'pent';
  818.  
  819.  
  820. TYPE
  821.     gxPenTableEntryPtr = ^gxPenTableEntry;
  822.     gxPenTableEntry = RECORD
  823.         penName:                Str31;                                    {  Name of the pen  }
  824.         penColor:                gxColor;                                {  Color to use from the color set  }
  825.         penThickness:            Fixed;                                    {  Size of the pen  }
  826.         penUnits:                INTEGER;                                {  Specifies units in which pen thickness is defined  }
  827.         penPosition:            INTEGER;                                {  Pen position in the carousel, -1 (kPenNotLoaded) if not loaded  }
  828.     END;
  829.  
  830.     gxPenTablePtr = ^gxPenTable;
  831.     gxPenTable = RECORD
  832.         numPens:                LONGINT;                                {  Number of pen entries in the following array  }
  833.         pens:                    ARRAY [0..0] OF gxPenTableEntry;        {  Array of pen entries  }
  834.     END;
  835.  
  836.     gxPenTableHdl                        = ^gxPenTablePtr;
  837. { penUnits field constants }
  838.  
  839. CONST
  840.     gxDeviceUnits                = 0;
  841.     gxMMUnits                    = 1;
  842.     gxInchesUnits                = 2;
  843.  
  844. { penPosition field constants }
  845.     gxPenNotLoaded                = -1;
  846.  
  847.  
  848. {
  849.  
  850.     >>>>>> DIALOG-RELATED CONSTANTS AND TYPES <<<<<<
  851.  
  852. }
  853.  
  854. TYPE
  855.     gxDialogResult                        = LONGINT;
  856.  
  857. CONST
  858.     gxCancelSelected            = 0;
  859.     gxOKSelected                = 1;
  860.     gxRevertSelected            = 2;
  861.  
  862.  
  863.  
  864. TYPE
  865.     gxEditMenuRecordPtr = ^gxEditMenuRecord;
  866.     gxEditMenuRecord = RECORD
  867.         editMenuID:                INTEGER;
  868.         cutItem:                INTEGER;
  869.         copyItem:                INTEGER;
  870.         pasteItem:                INTEGER;
  871.         clearItem:                INTEGER;
  872.         undoItem:                INTEGER;
  873.     END;
  874.  
  875.  
  876. {
  877.  
  878.     >>>>>> JOB FORMAT MODE CONSTANTS AND TYPES <<<<<<
  879.  
  880. }
  881.     gxJobFormatMode                        = OSType;
  882.     gxJobFormatModeTablePtr = ^gxJobFormatModeTable;
  883.     gxJobFormatModeTable = RECORD
  884.         numModes:                LONGINT;                                {  Number of job format modes to choose from  }
  885.         modes:                    ARRAY [0..0] OF gxJobFormatMode;        {  The job format modes  }
  886.     END;
  887.  
  888.     gxJobFormatModeTableHdl                = ^gxJobFormatModeTablePtr;
  889.  
  890. CONST
  891.     gxGraphicsJobFormatMode        = 'grph';
  892.     gxTextJobFormatMode            = 'text';
  893.     gxPostScriptJobFormatMode    = 'post';
  894.  
  895.  
  896. TYPE
  897.     gxQueryType                            = LONGINT;
  898.  
  899. CONST
  900.     gxGetJobFormatLineConstraintQuery = 0;
  901.     gxGetJobFormatFontsQuery    = 1;
  902.     gxGetJobFormatFontCommonStylesQuery = 2;
  903.     gxGetJobFormatFontConstraintQuery = 3;
  904.     gxSetStyleJobFormatCommonStyleQuery = 4;
  905.  
  906.  
  907. { Structures used for Text mode field constants }
  908.  
  909. TYPE
  910.     gxPositionConstraintTablePtr = ^gxPositionConstraintTable;
  911.     gxPositionConstraintTable = RECORD
  912.         phase:                    gxPoint;                                {  Position phase  }
  913.         offset:                    gxPoint;                                {  Position offset  }
  914.         numSizes:                LONGINT;                                {  Number of available font sizes  }
  915.         sizes:                    ARRAY [0..0] OF Fixed;                    {  The available font sizes  }
  916.     END;
  917.  
  918.     gxPositionConstraintTableHdl        = ^gxPositionConstraintTablePtr;
  919. { numSizes field constants }
  920.  
  921. CONST
  922.     gxConstraintRange            = -1;
  923.  
  924.  
  925. TYPE
  926.     gxStyleNameTablePtr = ^gxStyleNameTable;
  927.     gxStyleNameTable = RECORD
  928.         numStyleNames:            LONGINT;                                {  Number of style names  }
  929.         styleNames:                ARRAY [0..0] OF Str255;                    {  The style names  }
  930.     END;
  931.  
  932.     gxStyleNameTableHdl                    = ^gxStyleNameTablePtr;
  933.     gxFontTablePtr = ^gxFontTable;
  934.     gxFontTable = RECORD
  935.         numFonts:                LONGINT;                                {  Number of font references  }
  936.         fonts:                    ARRAY [0..0] OF gxFont;                    {  The font references  }
  937.     END;
  938.  
  939.     gxFontTableHdl                        = ^gxFontTablePtr;
  940. { ------------------------------------------------------------------------------
  941.  
  942.                                 Printing Manager API Functions
  943.  
  944. -------------------------------------------------------------------------------- }
  945. {
  946.     Global Routines
  947. }
  948. FUNCTION GXInitPrinting: OSErr;
  949.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  950.     INLINE $203C, $0000, $0000, $ABFE;
  951.     {$ENDC}
  952. FUNCTION GXExitPrinting: OSErr;
  953.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  954.     INLINE $203C, $0000, $0001, $ABFE;
  955.     {$ENDC}
  956.  
  957. {
  958.     Error-Handling Routines
  959. }
  960. FUNCTION GXGetJobError(aJob: gxJob): OSErr;
  961.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  962.     INLINE $203C, $0000, $000E, $ABFE;
  963.     {$ENDC}
  964. PROCEDURE GXSetJobError(aJob: gxJob; anErr: OSErr);
  965.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  966.     INLINE $203C, $0000, $000F, $ABFE;
  967.     {$ENDC}
  968.  
  969. {
  970.     Job Routines
  971. }
  972. FUNCTION GXNewJob(VAR aJob: gxJob): OSErr;
  973.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  974.     INLINE $203C, $0000, $0002, $ABFE;
  975.     {$ENDC}
  976. FUNCTION GXDisposeJob(aJob: gxJob): OSErr;
  977.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  978.     INLINE $203C, $0000, $0003, $ABFE;
  979.     {$ENDC}
  980. PROCEDURE GXFlattenJob(aJob: gxJob; flattenProc: GXPrintingFlattenUPP; aVoid: UNIV Ptr);
  981.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  982.     INLINE $203C, $0000, $0004, $ABFE;
  983.     {$ENDC}
  984. FUNCTION GXUnflattenJob(aJob: gxJob; flattenProc: GXPrintingFlattenUPP; aVoid: UNIV Ptr): gxJob;
  985.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  986.     INLINE $203C, $0000, $0005, $ABFE;
  987.     {$ENDC}
  988. FUNCTION GXFlattenJobToHdl(aJob: gxJob; aHdl: Handle): Handle;
  989.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  990.     INLINE $203C, $0000, $0006, $ABFE;
  991.     {$ENDC}
  992. FUNCTION GXUnflattenJobFromHdl(aJob: gxJob; aHdl: Handle): gxJob;
  993.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  994.     INLINE $203C, $0000, $0007, $ABFE;
  995.     {$ENDC}
  996. PROCEDURE GXInstallApplicationOverride(aJob: gxJob; messageID: INTEGER; override: UNIV Ptr);
  997.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  998.     INLINE $203C, $0000, $0008, $ABFE;
  999.     {$ENDC}
  1000. FUNCTION GXGetJobCollection(aJob: gxJob): Collection;
  1001.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1002.     INLINE $203C, $0000, $001D, $ABFE;
  1003.     {$ENDC}
  1004. FUNCTION GXGetJobRefCon(aJob: gxJob): Ptr;
  1005.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1006.     INLINE $203C, $0000, $001E, $ABFE;
  1007.     {$ENDC}
  1008. PROCEDURE GXSetJobRefCon(aJob: gxJob; refCon: UNIV Ptr);
  1009.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1010.     INLINE $203C, $0000, $001F, $ABFE;
  1011.     {$ENDC}
  1012. FUNCTION GXCopyJob(srcJob: gxJob; dstJob: gxJob): gxJob;
  1013.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1014.     INLINE $203C, $0000, $0020, $ABFE;
  1015.     {$ENDC}
  1016. PROCEDURE GXSelectJobFormattingPrinter(aJob: gxJob; VAR printerName: Str31);
  1017.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1018.     INLINE $203C, $0000, $0021, $ABFE;
  1019.     {$ENDC}
  1020. PROCEDURE GXSelectJobOutputPrinter(aJob: gxJob; VAR printerName: Str31);
  1021.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1022.     INLINE $203C, $0000, $0022, $ABFE;
  1023.     {$ENDC}
  1024. PROCEDURE GXForEachJobFormatDo(aJob: gxJob; formatProc: GXFormatUPP; refCon: UNIV Ptr);
  1025.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1026.     INLINE $203C, $0000, $0023, $ABFE;
  1027.     {$ENDC}
  1028. FUNCTION GXCountJobFormats(aJob: gxJob): LONGINT;
  1029.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1030.     INLINE $203C, $0000, $0024, $ABFE;
  1031.     {$ENDC}
  1032. FUNCTION GXUpdateJob(aJob: gxJob): BOOLEAN;
  1033.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1034.     INLINE $203C, $0000, $0025, $ABFE;
  1035.     {$ENDC}
  1036. PROCEDURE GXConvertPrintRecord(aJob: gxJob; hPrint: THPrint);
  1037.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1038.     INLINE $203C, $0000, $0026, $ABFE;
  1039.     {$ENDC}
  1040. PROCEDURE GXIdleJob(aJob: gxJob);
  1041.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1042.     INLINE $203C, $0000, $0057, $ABFE;
  1043.     {$ENDC}
  1044.  
  1045. {
  1046.     Job Format Modes Routines
  1047. }
  1048. PROCEDURE GXSetAvailableJobFormatModes(aJob: gxJob; formatModeTable: gxJobFormatModeTableHdl);
  1049.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1050.     INLINE $203C, $0000, $003B, $ABFE;
  1051.     {$ENDC}
  1052. FUNCTION GXGetPreferredJobFormatMode(aJob: gxJob; VAR directOnly: BOOLEAN): LONGINT;
  1053.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1054.     INLINE $203C, $0000, $003C, $ABFE;
  1055.     {$ENDC}
  1056. FUNCTION GXGetJobFormatMode(aJob: gxJob): LONGINT;
  1057.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1058.     INLINE $203C, $0000, $003D, $ABFE;
  1059.     {$ENDC}
  1060. PROCEDURE GXSetJobFormatMode(aJob: gxJob; formatMode: gxJobFormatMode);
  1061.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1062.     INLINE $203C, $0000, $003E, $ABFE;
  1063.     {$ENDC}
  1064. PROCEDURE GXJobFormatModeQuery(aJob: gxJob; aQueryType: gxQueryType; srcData: UNIV Ptr; dstData: UNIV Ptr);
  1065.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1066.     INLINE $203C, $0000, $003F, $ABFE;
  1067.     {$ENDC}
  1068.  
  1069. {
  1070.     Format Routines
  1071. }
  1072. FUNCTION GXNewFormat(aJob: gxJob): gxFormat;
  1073.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1074.     INLINE $203C, $0000, $0009, $ABFE;
  1075.     {$ENDC}
  1076. PROCEDURE GXDisposeFormat(aFormat: gxFormat);
  1077.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1078.     INLINE $203C, $0000, $000A, $ABFE;
  1079.     {$ENDC}
  1080. FUNCTION GXGetJobFormat(aJob: gxJob; whichFormat: LONGINT): gxFormat;
  1081.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1082.     INLINE $203C, $0000, $0013, $ABFE;
  1083.     {$ENDC}
  1084. FUNCTION GXGetFormatJob(aFormat: gxFormat): gxJob;
  1085.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1086.     INLINE $203C, $0000, $0014, $ABFE;
  1087.     {$ENDC}
  1088. FUNCTION GXGetFormatPaperType(aFormat: gxFormat): gxPaperType;
  1089.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1090.     INLINE $203C, $0000, $0015, $ABFE;
  1091.     {$ENDC}
  1092. PROCEDURE GXGetFormatDimensions(aFormat: gxFormat; VAR pageSize: gxRectangle; VAR paperSize: gxRectangle);
  1093.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1094.     INLINE $203C, $0000, $0016, $ABFE;
  1095.     {$ENDC}
  1096. FUNCTION GXGetFormatCollection(aFormat: gxFormat): Collection;
  1097.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1098.     INLINE $203C, $0000, $0033, $ABFE;
  1099.     {$ENDC}
  1100. PROCEDURE GXChangedFormat(aFormat: gxFormat);
  1101.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1102.     INLINE $203C, $0000, $0034, $ABFE;
  1103.     {$ENDC}
  1104. FUNCTION GXCopyFormat(srcFormat: gxFormat; dstFormat: gxFormat): gxFormat;
  1105.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1106.     INLINE $203C, $0000, $0035, $ABFE;
  1107.     {$ENDC}
  1108. FUNCTION GXCloneFormat(aFormat: gxFormat): gxFormat;
  1109.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1110.     INLINE $203C, $0000, $0036, $ABFE;
  1111.     {$ENDC}
  1112. FUNCTION GXCountFormatOwners(aFormat: gxFormat): LONGINT;
  1113.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1114.     INLINE $203C, $0000, $0037, $ABFE;
  1115.     {$ENDC}
  1116. PROCEDURE GXGetFormatMapping(aFormat: gxFormat; VAR fmtMapping: gxMapping);
  1117.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1118.     INLINE $203C, $0000, $0038, $ABFE;
  1119.     {$ENDC}
  1120. FUNCTION GXGetFormatForm(aFormat: gxFormat; VAR mask: gxShape): gxShape;
  1121.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1122.     INLINE $203C, $0000, $0039, $ABFE;
  1123.     {$ENDC}
  1124. PROCEDURE GXSetFormatForm(aFormat: gxFormat; form: gxShape; mask: gxShape);
  1125.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1126.     INLINE $203C, $0000, $003A, $ABFE;
  1127.     {$ENDC}
  1128.  
  1129. {
  1130.     PaperType Routines
  1131. }
  1132. FUNCTION GXNewPaperType(aJob: gxJob; VAR name: Str31; VAR pageSize: gxRectangle; VAR paperSize: gxRectangle): gxPaperType;
  1133.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1134.     INLINE $203C, $0000, $000B, $ABFE;
  1135.     {$ENDC}
  1136. PROCEDURE GXDisposePaperType(aPaperType: gxPaperType);
  1137.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1138.     INLINE $203C, $0000, $000C, $ABFE;
  1139.     {$ENDC}
  1140. FUNCTION GXGetNewPaperType(aJob: gxJob; resID: INTEGER): gxPaperType;
  1141.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1142.     INLINE $203C, $0000, $000D, $ABFE;
  1143.     {$ENDC}
  1144. FUNCTION GXCountJobPaperTypes(aJob: gxJob; forFormatDevice: BOOLEAN): LONGINT;
  1145.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1146.     INLINE $203C, $0000, $0042, $ABFE;
  1147.     {$ENDC}
  1148. FUNCTION GXGetJobPaperType(aJob: gxJob; whichPaperType: LONGINT; forFormatDevice: BOOLEAN; aPaperType: gxPaperType): gxPaperType;
  1149.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1150.     INLINE $203C, $0000, $0043, $ABFE;
  1151.     {$ENDC}
  1152. PROCEDURE GXForEachJobPaperTypeDo(aJob: gxJob; aProc: GXPaperTypeUPP; refCon: UNIV Ptr; forFormattingPrinter: BOOLEAN);
  1153.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1154.     INLINE $203C, $0000, $0044, $ABFE;
  1155.     {$ENDC}
  1156. FUNCTION GXCopyPaperType(srcPaperType: gxPaperType; dstPaperType: gxPaperType): gxPaperType;
  1157.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1158.     INLINE $203C, $0000, $0045, $ABFE;
  1159.     {$ENDC}
  1160. PROCEDURE GXGetPaperTypeName(aPaperType: gxPaperType; VAR papertypeName: Str31);
  1161.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1162.     INLINE $203C, $0000, $0046, $ABFE;
  1163.     {$ENDC}
  1164. PROCEDURE GXGetPaperTypeDimensions(aPaperType: gxPaperType; VAR pageSize: gxRectangle; VAR paperSize: gxRectangle);
  1165.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1166.     INLINE $203C, $0000, $0047, $ABFE;
  1167.     {$ENDC}
  1168. FUNCTION GXGetPaperTypeJob(aPaperType: gxPaperType): gxJob;
  1169.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1170.     INLINE $203C, $0000, $0048, $ABFE;
  1171.     {$ENDC}
  1172. FUNCTION GXGetPaperTypeCollection(aPaperType: gxPaperType): Collection;
  1173.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1174.     INLINE $203C, $0000, $0049, $ABFE;
  1175.     {$ENDC}
  1176.  
  1177. {
  1178.     Printer Routines
  1179. }
  1180. FUNCTION GXGetJobFormattingPrinter(aJob: gxJob): gxPrinter;
  1181.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1182.     INLINE $203C, $0000, $0027, $ABFE;
  1183.     {$ENDC}
  1184. FUNCTION GXGetJobOutputPrinter(aJob: gxJob): gxPrinter;
  1185.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1186.     INLINE $203C, $0000, $0028, $ABFE;
  1187.     {$ENDC}
  1188. FUNCTION GXGetJobPrinter(aJob: gxJob): gxPrinter;
  1189.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1190.     INLINE $203C, $0000, $0029, $ABFE;
  1191.     {$ENDC}
  1192. FUNCTION GXGetPrinterJob(aPrinter: gxPrinter): gxJob;
  1193.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1194.     INLINE $203C, $0000, $002A, $ABFE;
  1195.     {$ENDC}
  1196. PROCEDURE GXForEachPrinterViewDeviceDo(aPrinter: gxPrinter; aProc: GXViewDeviceUPP; refCon: UNIV Ptr);
  1197.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1198.     INLINE $203C, $0000, $002B, $ABFE;
  1199.     {$ENDC}
  1200. FUNCTION GXCountPrinterViewDevices(aPrinter: gxPrinter): LONGINT;
  1201.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1202.     INLINE $203C, $0000, $002C, $ABFE;
  1203.     {$ENDC}
  1204. FUNCTION GXGetPrinterViewDevice(aPrinter: gxPrinter; whichViewDevice: LONGINT): gxViewDevice;
  1205.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1206.     INLINE $203C, $0000, $002D, $ABFE;
  1207.     {$ENDC}
  1208. PROCEDURE GXSelectPrinterViewDevice(aPrinter: gxPrinter; whichViewDevice: LONGINT);
  1209.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1210.     INLINE $203C, $0000, $002E, $ABFE;
  1211.     {$ENDC}
  1212. PROCEDURE GXGetPrinterName(aPrinter: gxPrinter; VAR printerName: Str31);
  1213.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1214.     INLINE $203C, $0000, $002F, $ABFE;
  1215.     {$ENDC}
  1216. FUNCTION GXGetPrinterType(aPrinter: gxPrinter): LONGINT;
  1217.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1218.     INLINE $203C, $0000, $0030, $ABFE;
  1219.     {$ENDC}
  1220. PROCEDURE GXGetPrinterDriverName(aPrinter: gxPrinter; VAR driverName: Str31);
  1221.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1222.     INLINE $203C, $0000, $0031, $ABFE;
  1223.     {$ENDC}
  1224. FUNCTION GXGetPrinterDriverType(aPrinter: gxPrinter): LONGINT;
  1225.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1226.     INLINE $203C, $0000, $0032, $ABFE;
  1227.     {$ENDC}
  1228.  
  1229. {
  1230.     Dialog Routines
  1231. }
  1232. FUNCTION GXJobDefaultFormatDialog(aJob: gxJob; VAR anEditMenuRec: gxEditMenuRecord): gxDialogResult;
  1233.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1234.     INLINE $203C, $0000, $0010, $ABFE;
  1235.     {$ENDC}
  1236. FUNCTION GXJobPrintDialog(aJob: gxJob; VAR anEditMenuRec: gxEditMenuRecord): gxDialogResult;
  1237.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1238.     INLINE $203C, $0000, $0011, $ABFE;
  1239.     {$ENDC}
  1240. FUNCTION GXFormatDialog(aFormat: gxFormat; VAR anEditMenuRec: gxEditMenuRecord; title: StringPtr): gxDialogResult;
  1241.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1242.     INLINE $203C, $0000, $0012, $ABFE;
  1243.     {$ENDC}
  1244. PROCEDURE GXEnableJobScalingPanel(aJob: gxJob; enabled: BOOLEAN);
  1245.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1246.     INLINE $203C, $0000, $0040, $ABFE;
  1247.     {$ENDC}
  1248. PROCEDURE GXGetJobPanelDimensions(aJob: gxJob; VAR panelArea: Rect);
  1249.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1250.     INLINE $203C, $0000, $0041, $ABFE;
  1251.     {$ENDC}
  1252.  
  1253. {
  1254.     Spooling Routines
  1255. }
  1256. PROCEDURE GXGetJobPageRange(theJob: gxJob; VAR firstPage: LONGINT; VAR lastPage: LONGINT);
  1257.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1258.     INLINE $203C, $0000, $0017, $ABFE;
  1259.     {$ENDC}
  1260. PROCEDURE GXStartJob(theJob: gxJob; docName: StringPtr; pageCount: LONGINT);
  1261.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1262.     INLINE $203C, $0000, $0018, $ABFE;
  1263.     {$ENDC}
  1264. PROCEDURE GXPrintPage(theJob: gxJob; pageNumber: LONGINT; theFormat: gxFormat; thePage: gxShape);
  1265.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1266.     INLINE $203C, $0000, $0019, $ABFE;
  1267.     {$ENDC}
  1268. FUNCTION GXStartPage(theJob: gxJob; pageNumber: LONGINT; theFormat: gxFormat; numViewPorts: LONGINT; VAR viewPortList: gxViewPort): BOOLEAN;
  1269.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1270.     INLINE $203C, $0000, $001A, $ABFE;
  1271.     {$ENDC}
  1272. PROCEDURE GXFinishPage(theJob: gxJob);
  1273.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1274.     INLINE $203C, $0000, $001B, $ABFE;
  1275.     {$ENDC}
  1276. PROCEDURE GXFinishJob(theJob: gxJob);
  1277.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1278.     INLINE $203C, $0000, $001C, $ABFE;
  1279.     {$ENDC}
  1280.  
  1281. {
  1282.     PrintFile Routines
  1283. }
  1284. FUNCTION GXOpenPrintFile(theJob: gxJob; anFSSpec: FSSpecPtr; permission: ByteParameter): gxPrintFile;
  1285.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1286.     INLINE $203C, $0000, $004A, $ABFE;
  1287.     {$ENDC}
  1288. PROCEDURE GXClosePrintFile(aPrintFile: gxPrintFile);
  1289.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1290.     INLINE $203C, $0000, $004B, $ABFE;
  1291.     {$ENDC}
  1292. FUNCTION GXGetPrintFileJob(aPrintFile: gxPrintFile): gxJob;
  1293.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1294.     INLINE $203C, $0000, $004C, $ABFE;
  1295.     {$ENDC}
  1296. FUNCTION GXCountPrintFilePages(aPrintFile: gxPrintFile): LONGINT;
  1297.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1298.     INLINE $203C, $0000, $004D, $ABFE;
  1299.     {$ENDC}
  1300. PROCEDURE GXReadPrintFilePage(aPrintFile: gxPrintFile; pageNumber: LONGINT; numViewPorts: LONGINT; VAR viewPortList: gxViewPort; VAR pgFormat: gxFormat; VAR pgShape: gxShape);
  1301.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1302.     INLINE $203C, $0000, $004E, $ABFE;
  1303.     {$ENDC}
  1304. PROCEDURE GXReplacePrintFilePage(aPrintFile: gxPrintFile; pageNumber: LONGINT; aFormat: gxFormat; aShape: gxShape);
  1305.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1306.     INLINE $203C, $0000, $004F, $ABFE;
  1307.     {$ENDC}
  1308. PROCEDURE GXInsertPrintFilePage(aPrintFile: gxPrintFile; atPageNumber: LONGINT; pgFormat: gxFormat; pgShape: gxShape);
  1309.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1310.     INLINE $203C, $0000, $0050, $ABFE;
  1311.     {$ENDC}
  1312. PROCEDURE GXDeletePrintFilePageRange(aPrintFile: gxPrintFile; fromPageNumber: LONGINT; toPageNumber: LONGINT);
  1313.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1314.     INLINE $203C, $0000, $0051, $ABFE;
  1315.     {$ENDC}
  1316. PROCEDURE GXSavePrintFile(aPrintFile: gxPrintFile; VAR anFSSpec: FSSpec);
  1317.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1318.     INLINE $203C, $0000, $0052, $ABFE;
  1319.     {$ENDC}
  1320.  
  1321. {
  1322.     ColorSync Routines
  1323. }
  1324. FUNCTION GXFindPrinterProfile(aPrinter: gxPrinter; searchData: UNIV Ptr; index: LONGINT; VAR returnedProfile: gxColorProfile): LONGINT;
  1325.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1326.     INLINE $203C, $0000, $0053, $ABFE;
  1327.     {$ENDC}
  1328. FUNCTION GXFindFormatProfile(aFormat: gxFormat; searchData: UNIV Ptr; index: LONGINT; VAR returnedProfile: gxColorProfile): LONGINT;
  1329.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1330.     INLINE $203C, $0000, $0054, $ABFE;
  1331.     {$ENDC}
  1332. PROCEDURE GXSetPrinterProfile(aPrinter: gxPrinter; oldProfile: gxColorProfile; newProfile: gxColorProfile);
  1333.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1334.     INLINE $203C, $0000, $0055, $ABFE;
  1335.     {$ENDC}
  1336. PROCEDURE GXSetFormatProfile(aFormat: gxFormat; oldProfile: gxColorProfile; newProfile: gxColorProfile);
  1337.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1338.     INLINE $203C, $0000, $0056, $ABFE;
  1339.     {$ENDC}
  1340.  
  1341. {***********************************************************************
  1342.                         Start of old "GXPrintingResEquates.h/a/p" interface file.
  1343.                 ************************************************************************}
  1344. {    ------------------------------------
  1345.                 Basic client types
  1346.     ------------------------------------ }
  1347.  
  1348. CONST
  1349.     gxPrintingManagerType        = 'pmgr';
  1350.     gxImagingSystemType            = 'gxis';
  1351.     gxPrinterDriverType            = 'pdvr';
  1352.     gxPrintingExtensionType        = 'pext';
  1353.     gxUnknownPrinterType        = 'none';
  1354.     gxAnyPrinterType            = 'univ';
  1355.     gxQuickdrawPrinterType        = 'qdrw';
  1356.     gxPortableDocPrinterType    = 'gxpd';
  1357.     gxRasterPrinterType            = 'rast';
  1358.     gxPostscriptPrinterType        = 'post';
  1359.     gxVectorPrinterType            = 'vect';
  1360.  
  1361. { All pre-defined printing collection items have this ID }
  1362.     gxPrintingTagID                = -28672;
  1363.  
  1364.  
  1365. {    ----------------------------------------------------------------------
  1366.  
  1367.         Resource types and IDs used by both extension and driver writers
  1368.  
  1369.     ---------------------------------------------------------------------- }
  1370. { Resources in a printer driver or extension must be based off of these IDs }
  1371.     gxPrintingDriverBaseID        = -27648;
  1372.     gxPrintingExtensionBaseID    = -27136;
  1373.  
  1374. {    Override resources tell the system what messages a driver or extension
  1375.         is overriding.  A driver may have a series of these resources. }
  1376. {  Override resource type for 68k resource-based code: }
  1377.  
  1378.     gxOverrideType                = 'over';
  1379.  
  1380.  
  1381. {  Override resource type for PowerPC datafork-based code: }
  1382.  
  1383.     gxNativeOverrideType        = 'povr';
  1384.  
  1385.  
  1386. {    --------------------------------------------------------------
  1387.  
  1388.         Message ID definitions by both extension and driver writers
  1389.  
  1390.     --------------------------------------------------------------- }
  1391. { Identifiers for universal message overrides. }
  1392.     gxInitializeMsg                = 0;
  1393.     gxShutDownMsg                = 1;
  1394.     gxJobIdleMsg                = 2;
  1395.     gxJobStatusMsg                = 3;
  1396.     gxPrintingEventMsg            = 4;
  1397.     gxJobDefaultFormatDialogMsg    = 5;
  1398.     gxFormatDialogMsg            = 6;
  1399.     gxJobPrintDialogMsg            = 7;
  1400.     gxFilterPanelEventMsg        = 8;
  1401.     gxHandlePanelEventMsg        = 9;
  1402.     gxParsePageRangeMsg            = 10;
  1403.     gxDefaultJobMsg                = 11;
  1404.     gxDefaultFormatMsg            = 12;
  1405.     gxDefaultPaperTypeMsg        = 13;
  1406.     gxDefaultPrinterMsg            = 14;
  1407.     gxCreateSpoolFileMsg        = 15;
  1408.     gxSpoolPageMsg                = 16;
  1409.     gxSpoolDataMsg                = 17;
  1410.     gxSpoolResourceMsg            = 18;
  1411.     gxCompleteSpoolFileMsg        = 19;
  1412.     gxCountPagesMsg                = 20;
  1413.     gxDespoolPageMsg            = 21;
  1414.     gxDespoolDataMsg            = 22;
  1415.     gxDespoolResourceMsg        = 23;
  1416.     gxCloseSpoolFileMsg            = 24;
  1417.     gxStartJobMsg                = 25;
  1418.     gxFinishJobMsg                = 26;
  1419.     gxStartPageMsg                = 27;
  1420.     gxFinishPageMsg                = 28;
  1421.     gxPrintPageMsg                = 29;
  1422.     gxSetupImageDataMsg            = 30;
  1423.     gxImageJobMsg                = 31;
  1424.     gxImageDocumentMsg            = 32;
  1425.     gxImagePageMsg                = 33;
  1426.     gxRenderPageMsg                = 34;
  1427.     gxCreateImageFileMsg        = 35;
  1428.     gxOpenConnectionMsg            = 36;
  1429.     gxCloseConnectionMsg        = 37;
  1430.     gxStartSendPageMsg            = 38;
  1431.     gxFinishSendPageMsg            = 39;
  1432.     gxWriteDataMsg                = 40;
  1433.     gxBufferDataMsg                = 41;
  1434.     gxDumpBufferMsg                = 42;
  1435.     gxFreeBufferMsg                = 43;
  1436.     gxCheckStatusMsg            = 44;
  1437.     gxGetDeviceStatusMsg        = 45;
  1438.     gxFetchTaggedDataMsg        = 46;
  1439.     gxGetDTPMenuListMsg            = 47;
  1440.     gxDTPMenuSelectMsg            = 48;
  1441.     gxHandleAlertFilterMsg        = 49;
  1442.     gxJobFormatModeQueryMsg        = 50;
  1443.     gxWriteStatusToDTPWindowMsg    = 51;
  1444.     gxInitializeStatusAlertMsg    = 52;
  1445.     gxHandleAlertStatusMsg        = 53;
  1446.     gxHandleAlertEventMsg        = 54;
  1447.     gxCleanupStartJobMsg        = 55;
  1448.     gxCleanupStartPageMsg        = 56;
  1449.     gxCleanupOpenConnectionMsg    = 57;
  1450.     gxCleanupStartSendPageMsg    = 58;
  1451.     gxDefaultDesktopPrinterMsg    = 59;
  1452.     gxCaptureOutputDeviceMsg    = 60;
  1453.     gxOpenConnectionRetryMsg    = 61;
  1454.     gxExamineSpoolFileMsg        = 62;
  1455.     gxFinishSendPlaneMsg        = 63;
  1456.     gxDoesPaperFitMsg            = 64;
  1457.     gxChooserMessageMsg            = 65;
  1458.     gxFindPrinterProfileMsg        = 66;
  1459.     gxFindFormatProfileMsg        = 67;
  1460.     gxSetPrinterProfileMsg        = 68;
  1461.     gxSetFormatProfileMsg        = 69;
  1462.     gxHandleAltDestinationMsg    = 70;
  1463.     gxSetupPageImageDataMsg        = 71;
  1464.  
  1465.  
  1466. { Identifiers for Quickdraw message overrides. }
  1467.     gxPrOpenDocMsg                = 0;
  1468.     gxPrCloseDocMsg                = 1;
  1469.     gxPrOpenPageMsg                = 2;
  1470.     gxPrClosePageMsg            = 3;
  1471.     gxPrintDefaultMsg            = 4;
  1472.     gxPrStlDialogMsg            = 5;
  1473.     gxPrJobDialogMsg            = 6;
  1474.     gxPrStlInitMsg                = 7;
  1475.     gxPrJobInitMsg                = 8;
  1476.     gxPrDlgMainMsg                = 9;
  1477.     gxPrValidateMsg                = 10;
  1478.     gxPrJobMergeMsg                = 11;
  1479.     gxPrGeneralMsg                = 12;
  1480.     gxConvertPrintRecordToMsg    = 13;
  1481.     gxConvertPrintRecordFromMsg    = 14;
  1482.     gxPrintRecordToJobMsg        = 15;
  1483.  
  1484.  
  1485. { Identifiers for raster imaging message overrides. }
  1486.     gxRasterDataInMsg            = 0;
  1487.     gxRasterLineFeedMsg            = 1;
  1488.     gxRasterPackageBitmapMsg    = 2;
  1489.  
  1490.  
  1491. { Identifiers for PostScript imaging message overrides. }
  1492.     gxPostscriptQueryPrinterMsg    = 0;
  1493.     gxPostscriptInitializePrinterMsg = 1;
  1494.     gxPostscriptResetPrinterMsg    = 2;
  1495.     gxPostscriptExitServerMsg    = 3;
  1496.     gxPostscriptGetStatusTextMsg = 4;
  1497.     gxPostscriptGetPrinterTextMsg = 5;
  1498.     gxPostscriptScanStatusTextMsg = 6;
  1499.     gxPostscriptScanPrinterTextMsg = 7;
  1500.     gxPostscriptGetDocumentProcSetListMsg = 8;
  1501.     gxPostscriptDownloadProcSetListMsg = 9;
  1502.     gxPostscriptGetPrinterGlyphsInformationMsg = 10;
  1503.     gxPostscriptStreamFontMsg    = 11;
  1504.     gxPostscriptDoDocumentHeaderMsg = 12;
  1505.     gxPostscriptDoDocumentSetUpMsg = 13;
  1506.     gxPostscriptDoDocumentTrailerMsg = 14;
  1507.     gxPostscriptDoPageSetUpMsg    = 15;
  1508.     gxPostscriptSelectPaperTypeMsg = 16;
  1509.     gxPostscriptDoPageTrailerMsg = 17;
  1510.     gxPostscriptEjectPageMsg    = 18;
  1511.     gxPostscriptProcessShapeMsg    = 19;
  1512.     gxPostScriptEjectPendingPageMsg = 20;
  1513.  
  1514.  
  1515. { Identifiers for Vector imaging message overrides. }
  1516.     gxVectorPackageDataMsg        = 0;
  1517.     gxVectorLoadPensMsg            = 1;
  1518.     gxVectorVectorizeShapeMsg    = 2;
  1519.  
  1520.  
  1521. { Dialog related resource types }
  1522.     gxPrintingAlertType            = 'plrt';
  1523.     gxStatusType                = 'stat';
  1524.     gxExtendedDITLType            = 'xdtl';
  1525.     gxPrintPanelType            = 'ppnl';
  1526.     gxCollectionType            = 'cltn';
  1527.  
  1528.  
  1529. { Communication resource types }
  1530. {
  1531.     The looker resource is used by the Chooser PACK to determine what kind
  1532.     of communications this driver supports. (In order to generate/handle the 
  1533.     pop-up menu for "Connect via:".
  1534.     
  1535.     The looker resource is also used by PrinterShare to determine the AppleTalk NBP Type
  1536.     for servers created for this driver.
  1537. }
  1538.     gxLookerType                = 'look';
  1539.     gxLookerID                    = -4096;
  1540.  
  1541.  
  1542. { The communications method and private data used to connect to the printer }
  1543.     gxDeviceCommunicationsType    = 'comm';
  1544.  
  1545. {    -------------------------------------------------
  1546.  
  1547.     Resource types and IDs used by extension writers
  1548.  
  1549.     ------------------------------------------------- }
  1550.     gxExtensionUniversalOverrideID = -27136;
  1551.  
  1552.     gxExtensionImagingOverrideSelectorID = -27136;
  1553.  
  1554.     gxExtensionScopeType        = 'scop';
  1555.     gxDriverScopeID                = -27136;
  1556.     gxPrinterScopeID            = -27135;
  1557.     gxPrinterExceptionScopeID    = -27134;
  1558.  
  1559.     gxExtensionLoadType            = 'load';
  1560.     gxExtensionLoadID            = -27136;
  1561.  
  1562.     gxExtensionLoadFirst        = $00000100;
  1563.     gxExtensionLoadAnywhere        = $7FFFFFFF;
  1564.     gxExtensionLoadLast            = $FFFFFF00;
  1565.  
  1566.     gxExtensionOptimizationType    = 'eopt';
  1567.     gxExtensionOptimizationID    = -27136;
  1568.  
  1569.  
  1570. {    -----------------------------------------------
  1571.  
  1572.     Resource types and IDs used by driver writers
  1573.  
  1574.     ----------------------------------------------- }
  1575.     gxDriverUniversalOverrideID    = -27648;
  1576.     gxDriverImagingOverrideID    = -27647;
  1577.     gxDriverCompatibilityOverrideID = -27646;
  1578.  
  1579.     gxDriverFileFormatType        = 'pfil';
  1580.     gxDriverFileFormatID        = -27648;
  1581.  
  1582.  
  1583.     gxDestinationAdditionType    = 'dsta';
  1584.     gxDestinationAdditionID        = -27648;
  1585.  
  1586.  
  1587. { IMAGING RESOURCES }
  1588. {    The imaging system resource specifies which imaging system a printer
  1589.         driver wishes to use. }
  1590.  
  1591.     gxImagingSystemSelectorType    = 'isys';
  1592.     gxImagingSystemSelectorID    = -27648;
  1593.  
  1594.  
  1595. { 'exft' resource ID -- exclude font list }
  1596.     kExcludeFontListType        = 'exft';
  1597.     kExcludeFontListID            = -27648;
  1598.  
  1599. { Resource for type for color matching }
  1600.     gxColorMatchingDataType        = 'prof';
  1601.     gxColorMatchingDataID        = -27648;
  1602.  
  1603.  
  1604. { Resource type and id for the tray count }
  1605.     gxTrayCountDataType            = 'tray';
  1606.     gxTrayCountDataID            = -27648;
  1607.  
  1608.  
  1609. { Resource type for the tray names }
  1610.     gxTrayNameDataType            = 'tryn';
  1611.  
  1612.  
  1613. { Resource type for manual feed preferences, stored in DTP. }
  1614.     gxManualFeedAlertPrefsType    = 'mfpr';
  1615.     gxManualFeedAlertPrefsID    = -27648;
  1616.  
  1617. { Resource type for desktop printer output characteristics, stored in DTP. }
  1618.     gxDriverOutputType            = 'outp';
  1619.     gxDriverOutputTypeID        = 1;
  1620.  
  1621.  
  1622. { IO Resources }
  1623. { Resource type and ID for default IO and buffering resources }
  1624.     gxUniversalIOPrefsType        = 'iobm';
  1625.     gxUniversalIOPrefsID        = -27648;
  1626.  
  1627.  
  1628. {    Resource types and IDs for default implementation of CaptureOutputDevice.
  1629.         The default implementation of CaptureOutputDevice only handles PAP devices }
  1630.     gxCaptureType                = 'cpts';
  1631.     gxCaptureStringID            = -27648;
  1632.     gxReleaseStringID            = -27647;
  1633.     gxUncapturedAppleTalkType    = -27646;
  1634.     gxCapturedAppleTalkType        = -27645;
  1635.  
  1636.  
  1637. { Resource type and ID for custom halftone matrix }
  1638.     gxCustomMatrixType            = 'dmat';
  1639.     gxCustomMatrixID            = -27648;
  1640.  
  1641. { Resource type and ID for raster driver rendering preferences }
  1642.     gxRasterPrefsType            = 'rdip';
  1643.     gxRasterPrefsID                = -27648;
  1644.  
  1645.  
  1646. { Resource type for specifiying a colorset }
  1647.     gxColorSetResType            = 'crst';
  1648.  
  1649.  
  1650. { Resource type and ID for raster driver packaging preferences }
  1651.     gxRasterPackType            = 'rpck';
  1652.     gxRasterPackID                = -27648;
  1653.  
  1654.  
  1655. { Resource type and ID for raster driver packaging options }
  1656.  
  1657.     gxRasterNumNone                = 0;                            {  Number isn't output at all  }
  1658.     gxRasterNumDirect            = 1;                            {  Lowest minWidth bytes as data  }
  1659.     gxRasterNumToASCII            = 2;                            {  minWidth ASCII characters  }
  1660.  
  1661.  
  1662.     gxRasterPackOptionsType        = 'ropt';
  1663.     gxRasterPackOptionsID        = -27648;
  1664.  
  1665.  
  1666. { Resource type for the PostScript imaging system procedure set control resource }
  1667.     gxPostscriptProcSetControlType = 'prec';
  1668.  
  1669.  
  1670. { Resource type for the PostScript imaging system printer font resource }
  1671.     gxPostscriptPrinterFontType    = 'pfnt';
  1672.  
  1673.  
  1674. { Resource type and ID for the PostScript imaging system imaging preferences }
  1675.     gxPostscriptPrefsType        = 'pdip';
  1676.     gxPostscriptPrefsID            = -27648;
  1677.  
  1678. { Resource type and ID for the PostScript imaging system default scanning code }
  1679.     gxPostscriptScanningType    = 'scan';
  1680.     gxPostscriptScanningID        = -27648;
  1681.  
  1682.  
  1683. { Old Application Support Resources }
  1684.     gxCustType                    = 'cust';
  1685.     gxCustID                    = -8192;
  1686.  
  1687.  
  1688.     gxReslType                    = 'resl';
  1689.     gxReslID                    = -8192;
  1690.  
  1691.  
  1692.     gxDiscreteResolution        = 0;
  1693.  
  1694.  
  1695.     gxStlDialogResID            = -8192;
  1696.  
  1697.  
  1698.     gxJobDialogResID            = -8191;
  1699.  
  1700.  
  1701.     gxScaleTableType            = 'stab';
  1702.     gxDITLControlType            = 'dctl';
  1703.  
  1704. {    The default implementation of gxPrintDefault loads and
  1705.     PrValidates a print record stored in the following driver resource. }
  1706.     gxPrintRecordType            = 'PREC';
  1707.     gxDefaultPrintRecordID        = 0;
  1708.  
  1709.  
  1710. {
  1711.     -----------------------------------------------
  1712.  
  1713.     Resource types and IDs used in papertype files
  1714.  
  1715.     -----------------------------------------------
  1716. }
  1717. { Resource type and ID for driver papertypes placed in individual files }
  1718.     gxSignatureType                = 'sig ';
  1719.     gxPapertypeSignatureID        = 0;
  1720.  
  1721.  
  1722. { Papertype creator types }
  1723.     gxDrvrPaperType                = 'drpt';
  1724.     gxSysPaperType                = 'sypt';                        {  System paper type creator  }
  1725.     gxUserPaperType                = 'uspt';                        {  User paper type creator  }
  1726.                                                                 {  Driver creator types == driver file's creator value  }
  1727.     gxPaperTypeType                = 'ptyp';
  1728.  
  1729.  
  1730. {********************************************************************
  1731.                     Start of old "GXPrintingMessages.h/a/p" interface file.
  1732.             *********************************************************************}
  1733. { ------------------------------------------------------------------------------
  1734.  
  1735.                                     Constants and Types
  1736.  
  1737. -------------------------------------------------------------------------------- }
  1738. {
  1739.  
  1740.     ABSTRACT DATA TYPES
  1741.  
  1742. }
  1743.  
  1744. TYPE
  1745.     gxSpoolFile = ^LONGINT;
  1746. {
  1747.  
  1748.     DIALOG PANEL CONSTANTS AND TYPES
  1749.  
  1750. }
  1751.     gxPanelEvent                        = LONGINT;
  1752. { Dialog panel event equates }
  1753.  
  1754. CONST
  1755.     gxPanelNoEvt                = 0;
  1756.     gxPanelOpenEvt                = 1;                            {  Initialize and draw  }
  1757.     gxPanelCloseEvt                = 2;                            {  Your panel is going away (panel switchL, confirm or cancel)  }
  1758.     gxPanelHitEvt                = 3;                            {  There's a hit in your panel  }
  1759.     gxPanelActivateEvt            = 4;                            {  The dialog window has just been activated  }
  1760.     gxPanelDeactivateEvt        = 5;                            {  The dialog window is about to be deactivated  }
  1761.     gxPanelIconFocusEvt            = 6;                            {  The focus changes from the panel to the icon list  }
  1762.     gxPanelPanelFocusEvt        = 7;                            {  The focus changes from the icon list to the panel  }
  1763.     gxPanelFilterEvt            = 8;                            {  Every event is filtered  }
  1764.     gxPanelCancelEvt            = 9;                            {  The user has cancelled the dialog  }
  1765.     gxPanelConfirmEvt            = 10;                            {  The user has confirmed the dialog  }
  1766.     gxPanelDialogEvt            = 11;                            {  Event to be handle by dialoghandler  }
  1767.     gxPanelOtherEvt                = 12;                            {  osEvts, etc.  }
  1768.     gxPanelUserWillConfirmEvt    = 13;                            {  User has selected confirm, time to parse panel interdependencies  }
  1769.  
  1770.  
  1771. { Constants for panel responses to dialog handler calls }
  1772.  
  1773. TYPE
  1774.     gxPanelResult                        = LONGINT;
  1775.  
  1776. CONST
  1777.     gxPanelNoResult                = 0;
  1778.     gxPanelCancelConfirmation    = 1;                            {  Only valid from panelUserWillConfirmEvt - used to keep the dialog from going away  }
  1779.  
  1780.  
  1781. { Panel event info record for FilterPanelEvent and HandlePanelEvent messages }
  1782.  
  1783. TYPE
  1784.     gxPanelInfoRecordPtr = ^gxPanelInfoRecord;
  1785.     gxPanelInfoRecord = RECORD
  1786.         panelEvt:                gxPanelEvent;                            {  Why we were called  }
  1787.         panelResId:                INTEGER;                                {  'ppnl' resource ID of current panel  }
  1788.         pDlg:                    DialogPtr;                                {  Pointer to dialog  }
  1789.         theEvent:                EventRecordPtr;                            {  Pointer to event  }
  1790.         itemHit:                INTEGER;                                {  Actual item number as Dialog Mgr thinks  }
  1791.         itemCount:                INTEGER;                                {  Number of items before your items  }
  1792.         evtAction:                INTEGER;                                {  Once this event is processed, the action that will result  }
  1793.                                                                         {  (evtAction is only meaningful during filtering)  }
  1794.         errorStringId:            INTEGER;                                {  STR ID of string to put in error alert (0 means no string)  }
  1795.         theFormat:                gxFormat;                                {  The current format (only meaningful in a format dialog)  }
  1796.         refCon:                    Ptr;                                    {  refCon passed in PanelSetupRecord  }
  1797.     END;
  1798.  
  1799. { Constants for the evtAction field in PanelInfoRecord }
  1800.  
  1801. CONST
  1802.     gxOtherAction                = 0;                            {  Current item will not change  }
  1803.     gxClosePanelAction            = 1;                            {  Panel will be closed  }
  1804.     gxCancelDialogAction        = 2;                            {  Dialog will be cancelled  }
  1805.     gxConfirmDialogAction        = 3;                            {  Dialog will be confirmed  }
  1806.  
  1807.  
  1808. { Constants for the panelKind field in gxPanelSetupRecord }
  1809.  
  1810. TYPE
  1811.     gxPrintingPanelKind                    = LONGINT;
  1812. { The gxPanelSetupInfo structure is passed to GXSetupDialogPanel }
  1813.     gxPanelSetupRecordPtr = ^gxPanelSetupRecord;
  1814.     gxPanelSetupRecord = RECORD
  1815.         panelKind:                gxPrintingPanelKind;
  1816.         panelResId:                INTEGER;
  1817.         resourceRefNum:            INTEGER;
  1818.         refCon:                    Ptr;
  1819.     END;
  1820.  
  1821.  
  1822. CONST
  1823.     gxApplicationPanel            = 0;
  1824.     gxExtensionPanel            = 1;
  1825.     gxDriverPanel                = 2;
  1826.  
  1827.  
  1828. { Constants returned by gxParsePageRange message }
  1829.  
  1830. TYPE
  1831.     gxParsePageRangeResult                = LONGINT;
  1832.  
  1833. CONST
  1834.     gxRangeNotParsed            = 0;                            {  Default initial value  }
  1835.     gxRangeParsed                = 1;                            {  Range has been parsed  }
  1836.     gxRangeBadFromValue            = 2;                            {  From value is bad  }
  1837.     gxRangeBadToValue            = 3;                            {  To value is bad  }
  1838.  
  1839. {
  1840.  
  1841.     STATUS-RELATED CONSTANTS AND TYPES
  1842.  
  1843. }
  1844.  
  1845. { Structure for status messages }
  1846.  
  1847. TYPE
  1848.     gxStatusRecordPtr = ^gxStatusRecord;
  1849.     gxStatusRecord = RECORD
  1850.         statusType:                UInt16;                                    {  One of the ids listed above (nonFatalError, etc. )  }
  1851.         statusId:                UInt16;                                    {  Specific status (out of paper, etc.)  }
  1852.         statusAlertId:            UInt16;                                    {     Printing alert ID (if any) for status  }
  1853.         statusOwner:            gxOwnerSignature;                        {  Creator type of status owner  }
  1854.         statResId:                INTEGER;                                {  ID for 'stat' resource  }
  1855.         statResIndex:            INTEGER;                                {  Index into 'stat' resource for this status  }
  1856.         dialogResult:            INTEGER;                                {  ID of button string selected on dismissal of printing alert  }
  1857.         bufferLen:                UInt16;                                    {  Number of bytes in status buffer - total record size must be <= 512  }
  1858.         statusBuffer:            SInt8;                                    {  User response from alert  }
  1859.     END;
  1860.  
  1861.  
  1862. { Constants for statusType field of gxStatusRecord }
  1863.  
  1864. CONST
  1865.     gxNonFatalError                = 1;                            {  An error occurred, but the job can continue  }
  1866.     gxFatalError                = 2;                            {  A fatal error occurred-- halt job  }
  1867.     gxPrinterReady                = 3;                            {  Tells QDGX to leave alert mode  }
  1868.     gxUserAttention                = 4;                            {  Signals initiation of a modal alert  }
  1869.     gxUserAlert                    = 5;                            {  Signals initiation of a moveable modal alert  }
  1870.     gxPageTransmission            = 6;                            {  Signals page sent to printer, increments page count in strings to user  }
  1871.     gxOpenConnectionStatus        = 7;                            {  Signals QDGX to begin animation on printer icon  }
  1872.     gxInformationalStatus        = 8;                            {  Default status type, no side effects  }
  1873.     gxSpoolingPageStatus        = 9;                            {  Signals page spooled, increments page count in spooling dialog  }
  1874.     gxEndStatus                    = 10;                            {  Signals end of spooling  }
  1875.     gxPercentageStatus            = 11;                            {  Signals QDGX as to the amount of the job which is currently complete  }
  1876.  
  1877.  
  1878. { Structure for gxWriteStatusToDTPWindow message }
  1879.  
  1880. TYPE
  1881.     gxDisplayRecordPtr = ^gxDisplayRecord;
  1882.     gxDisplayRecord = RECORD
  1883.         useText:                BOOLEAN;                                {  Use text as opposed to a picture  }
  1884.         padByte:                SInt8;
  1885.         hPicture:                Handle;                                    {  if !useText, the picture handle  }
  1886.         theText:                Str255;                                    {  if useText, the text  }
  1887.     END;
  1888.  
  1889.  
  1890. {-----------------------------------------------}
  1891. { paper mapping-related constants and types...  }
  1892. {-----------------------------------------------}
  1893.  
  1894.     gxTrayMapping                        = LONGINT;
  1895.  
  1896. CONST
  1897.     gxDefaultTrayMapping        = 0;
  1898.     gxConfiguredTrayMapping        = 1;
  1899.  
  1900.  
  1901.  
  1902. { ------------------------------------------------------------------------------
  1903.  
  1904.                 API Functions callable only from within message overrides
  1905.  
  1906. -------------------------------------------------------------------------------- }
  1907.  
  1908. {
  1909.     Message Sending API Routines
  1910. }
  1911. {
  1912.  
  1913.     How to use the GXPRINTINGDISPATCH macro...
  1914.     
  1915.     If your driver or extension is large, you may want to segment it
  1916.     across smaller boundaries than is permitted by the messaging system.
  1917.     Without using the Printing Manager's segmentation manager directly,
  1918.     the smallest segment you can create consists of the code to override
  1919.     a single message.  If you are overriding workhorse messages such as
  1920.     RenderPage, you may want to divide up the work among many functions
  1921.     distributed across several segments.  Here's how...
  1922.     
  1923.     The Printing Manager segment scheme involves the construction of a
  1924.     single 32-bit dispatch selector, which contains all the information
  1925.     necessary for the dispatcher to find a single routine.  It contains the
  1926.     segment's resource ID, and the offset within the segment which contains
  1927.     the start of the routine.  The GXPRINTINGDISPATCH macro will construct the
  1928.     dispatch selector for you, as well as the code to do the dispatch.
  1929.     
  1930.     Usually, it is convenient to start your segment with a long aligned jump table,
  1931.     beginning after the 4 byte header required by the Printing Manager.  The
  1932.     macro assumes this is the case and takes a 1-based routine selector from
  1933.     which it conmstructs the offset.
  1934.     
  1935.     For example, if your code is in resource 'pdvr' (print driver), ID=2
  1936.     at offset=12 (third routine in segment), you would declare your
  1937.     routine as follows:
  1938.     
  1939.     OSErr MyRenderingRoutine (long param1, Ptr param2)
  1940.         = GXPRINTINGDISPATCH(2, 3);
  1941.         
  1942.     Remember, ALL segment dispatches must return OSErr.  If your routine
  1943.     does not generate errors, you must still declare it to return OSErr
  1944.     and have the routine itself return noErr.
  1945.     
  1946.     An alternative way to call across segments is to call the GXPrintingDispatch
  1947.     function directly.  You must construct the 32-bit selector yourself and pass
  1948.     it as the first parameter.  This is usually not preferable since you don't get
  1949.     type-checking unless you declare a prototype as shown above, and your code
  1950.     isn't as easy to read.
  1951.     
  1952.     So given the above prototype, there are two ways to call the function:
  1953.     
  1954.         anErr = MyRenderingRoutine(p1, p2);            // Free type checking!
  1955.         
  1956.     or:
  1957.     
  1958.         #define kMyRenderRoutineSelector 0x0002000C
  1959.         anErr = GXPrintingDispatch(kMyRenderRoutineSelector, p1, p2);        // No type-checking!
  1960.     
  1961.     
  1962.     Both have the same effect.
  1963.  
  1964. }
  1965. FUNCTION GXGetJob: gxJob; C;
  1966. FUNCTION GXGetMessageHandlerResFile: INTEGER; C;
  1967. FUNCTION GXSpoolingAborted: BOOLEAN; C;
  1968. FUNCTION GXJobIdle: OSErr; C;
  1969. FUNCTION GXReportStatus(statusID: LONGINT; statusIndex: UInt32): OSErr; C;
  1970. FUNCTION GXAlertTheUser(VAR statusRec: gxStatusRecord): OSErr; C;
  1971. FUNCTION GXSetupDialogPanel(VAR panelRec: gxPanelSetupRecord): OSErr; C;
  1972. FUNCTION GXCountTrays(VAR numTrays: gxTrayIndex): OSErr; C;
  1973. FUNCTION GXGetTrayName(trayNumber: gxTrayIndex; VAR trayName: Str31): OSErr; C;
  1974. FUNCTION GXSetTrayPaperType(whichTray: gxTrayIndex; aPapertype: gxPaperType): OSErr; C;
  1975. FUNCTION GXGetTrayPaperType(whichTray: gxTrayIndex; aPapertype: gxPaperType): OSErr; C;
  1976. FUNCTION GXGetTrayMapping(VAR trayMapping: gxTrayMapping): OSErr; C;
  1977. PROCEDURE GXCleanupStartJob; C;
  1978. PROCEDURE GXCleanupStartPage; C;
  1979. PROCEDURE GXCleanupOpenConnection; C;
  1980. PROCEDURE GXCleanupStartSendPage; C;
  1981.  
  1982. { ------------------------------------------------------------------------------
  1983.  
  1984.                     Constants and types for Universal Printing Messages
  1985.  
  1986. -------------------------------------------------------------------------------- }
  1987.  
  1988. { Options for gxCreateSpoolFile message }
  1989.  
  1990. CONST
  1991.     gxNoCreateOptions            = $00000000;                    {  Just create the file  }
  1992.     gxInhibitAlias                = $00000001;                    {  Do not create an alias in the PMD folder  }
  1993.     gxInhibitUniqueName            = $00000002;                    {  Do not append to the filename to make it unique  }
  1994.     gxResolveBitmapAlias        = $00000004;                    {  Resolve bitmap aliases and duplicate data in file  }
  1995.  
  1996.  
  1997. { Options for gxCloseSpoolFile message }
  1998.     gxNoCloseOptions            = $00000000;                    {  Just close the file  }
  1999.     gxDeleteOnClose                = $00000001;                    {  Delete the file rather than closing it  }
  2000.     gxUpdateJobData                = $00000002;                    {  Write current job information into file prior to closing  }
  2001.     gxMakeRemoteFile            = $00000004;                    {  Mark job as a remote file  }
  2002.  
  2003.  
  2004. { Options for gxCreateImageFile message }
  2005.     gxNoImageFile                = $00000000;                    {  Don't create image file  }
  2006.     gxMakeImageFile                = $00000001;                    {  Create an image file  }
  2007.     gxEachPlane                    = $00000002;                    {  Only save up planes before rewinding  }
  2008.     gxEachPage                    = $00000004;                    {  Save up entire pages before rewinding  }
  2009.     gxEntireFile                = $00000006;                    {  Save up the entire file before rewinding  }
  2010.  
  2011.  
  2012. { Options for gxBufferData message }
  2013.     gxNoBufferOptions            = $00000000;
  2014.     gxMakeBufferHex                = $00000001;
  2015.     gxDontSplitBuffer            = $00000002;
  2016.  
  2017.  
  2018. { Structure for gxDumpBuffer and gxFreeBuffer messages }
  2019.  
  2020. TYPE
  2021.     gxPrintingBufferPtr = ^gxPrintingBuffer;
  2022.     gxPrintingBuffer = RECORD
  2023.         size:                    LONGINT;                                {  Size of buffer in bytes  }
  2024.         userData:                LONGINT;                                {  Client assigned id for the buffer  }
  2025.         data:                    SInt8;                                    {  Array of size bytes  }
  2026.     END;
  2027.  
  2028.  
  2029. { Structure for gxRenderPage message }
  2030.     gxPageInfoRecordPtr = ^gxPageInfoRecord;
  2031.     gxPageInfoRecord = RECORD
  2032.         docPageNum:                LONGINT;                                {  Number of page being printed  }
  2033.         copyNum:                LONGINT;                                {  Copy number being printed  }
  2034.         formatChanged:            BOOLEAN;                                {  True if format changed from last page  }
  2035.         pageChanged:            BOOLEAN;                                {  True if page contents changed from last page  }
  2036.         internalUse:            LONGINT;                                {  Private  }
  2037.     END;
  2038.  
  2039.  
  2040. { ------------------------------------------------------------------------------
  2041.  
  2042.                                 Universal Printing Messages
  2043.  
  2044. -------------------------------------------------------------------------------- }
  2045. {******************************************************************
  2046.                     Start of old "GXPrintingErrors.h/a/p" interface file.
  2047.             *******************************************************************}
  2048.  
  2049. CONST
  2050.     gxPrintingResultBase        = -510;                            { First QuickDraw GX printing error code. }
  2051.  
  2052. {RESULT CODES FOR QUICKDRAW GX PRINTING OPERATIONS}
  2053.     gxAioTimeout                = -510;                            { -510 : Timeout condition occurred during operation }
  2054.     gxAioBadRqstState            = -511;                            { -511 : Async I/O request in invalid state for operation }
  2055.     gxAioBadConn                = -512;                            { -512 : Invalid Async I/O connection refnum }
  2056.     gxAioInvalidXfer            = -513;                            { -513 : Read data transfer structure contained bad values }
  2057.     gxAioNoRqstBlks                = -514;                            { -514 : No available request blocks to process request }
  2058.     gxAioNoDataXfer                = -515;                            { -515 : Data transfer structure pointer not specified }
  2059.     gxAioTooManyAutos            = -516;                            { -516 : Auto status request already active }
  2060.     gxAioNoAutoStat                = -517;                            { -517 : Connection not configured for auto status }
  2061.     gxAioBadRqstID                = -518;                            { -518 : Invalid I/O request identifier }
  2062.     gxAioCantKill                = -519;                            { -519 : Comm. protocol doesn't support I/O term }
  2063.     gxAioAlreadyExists            = -520;                            { -520 : Protocol spec. data already specified }
  2064.     gxAioCantFind                = -521;                            { -521 : Protocol spec. data does not exist }
  2065.     gxAioDeviceDisconn            = -522;                            { -522 : Machine disconnected from printer }
  2066.     gxAioNotImplemented            = -523;                            { -523 : Function not implemented }
  2067.     gxAioOpenPending            = -524;                            { -524 : Opening a connection for protocol, but another open pending }
  2068.     gxAioNoProtocolData            = -525;                            { -525 : No protocol specific data specified in request }
  2069.     gxAioRqstKilled                = -526;                            { -526 : I/O request was terminated }
  2070.     gxBadBaudRate                = -527;                            { -527 : Invalid baud rate specified }
  2071.     gxBadParity                    = -528;                            { -528 : Invalid parity specified }
  2072.     gxBadStopBits                = -529;                            { -529 : Invalid stop bits specified }
  2073.     gxBadDataBits                = -530;                            { -530 : Invalid data bits specified }
  2074.     gxBadPrinterName            = -531;                            { -531 : Bad printer name specified }
  2075.     gxAioBadMsgType                = -532;                            { -532 : Bad masType field in transfer info structure }
  2076.     gxAioCantFindDevice            = -533;                            { -533 : Cannot locate target device }
  2077.     gxAioOutOfSeq                = -534;                            { -534 : Non-atomic SCSI requests submitted out of sequence }
  2078.     gxPrIOAbortErr                = -535;                            { -535 : I/O operation aborted }
  2079.     gxPrUserAbortErr            = -536;                            { -536 : User aborted }
  2080.     gxCantAddPanelsNowErr        = -537;                            { -537 : Can only add panels during driver switch or dialog setup }
  2081.     gxBadxdtlKeyErr                = -538;                            { -538 : Unknown key for xdtl - must be radiobutton, etc }
  2082.     gxXdtlItemOutOfRangeErr        = -539;                            { -539 : Referenced item does not belong to panel }
  2083.     gxNoActionButtonErr            = -540;                            { -540 : Action button is nil }
  2084.     gxTitlesTooLongErr            = -541;                            { -541 : Length of buttons exceeds alert maximum width }
  2085.     gxUnknownAlertVersionErr    = -542;                            { -542 : Bad version for printing alerts }
  2086.     gxGBBufferTooSmallErr        = -543;                            { -543 : Buffer too small. }
  2087.     gxInvalidPenTable            = -544;                            { -544 : Invalid vector driver pen table. }
  2088.     gxIncompletePrintFileErr    = -545;                            { -545 : Print file was not completely spooled }
  2089.     gxCrashedPrintFileErr        = -546;                            { -546 : Print file is corrupted }
  2090.     gxInvalidPrintFileVersion    = -547;                            { -547 : Print file is incompatible with current QuickDraw GX version }
  2091.     gxSegmentLoadFailedErr        = -548;                            { -548 : Segment loader error }
  2092.     gxExtensionNotFoundErr        = -549;                            { -549 : Requested printing extension could not be found }
  2093.     gxDriverVersionErr            = -550;                            { -550 : Driver too new for current version of QuickDraw GX }
  2094.     gxImagingSystemVersionErr    = -551;                            { -551 : Imaging system too new for current version of QuickDraw GX }
  2095.     gxFlattenVersionTooNew        = -552;                            { -552 : Flattened object format too new for current version of QDGX }
  2096.     gxPaperTypeNotFound            = -553;                            { -553 : Requested papertype could not be found }
  2097.     gxNoSuchPTGroup                = -554;                            { -554 : Requested papertype group could not be found }
  2098.     gxNotEnoughPrinterMemory    = -555;                            { -555 : Printer does not have enough memory for fonts in document }
  2099.     gxDuplicatePanelNameErr        = -556;                            { -556 : Attempt to add more than 10 panels with the same name }
  2100.     gxExtensionVersionErr        = -557;                            { -557 : Extension too new for current version of QuickDraw GX }
  2101.  
  2102.  
  2103.  
  2104. {$ALIGN RESET}
  2105. {$POP}
  2106.  
  2107. {$SETC UsingIncludes := GXPrintingIncludes}
  2108.  
  2109. {$ENDC} {__GXPRINTING__}
  2110.  
  2111. {$IFC NOT UsingIncludes}
  2112.  END.
  2113. {$ENDC}
  2114.